import Main from '../views/Main.vue'
function getLeftMenu() {
    let arr = [

        {
            path: "",
            name: 'home',
            component: Main,
            redirect:'/index/dashboard',
            meta: {
                title: "首页",
                icon: "icon-home"
            },
            children: [
                {
                    path:'dashboard',
                    name:'dashboard',//首页
                    component:()=>import('@/views/Dashboard.vue'),
                    meta:{
                        title:"首页",
                        icon:"icon-home",
                        hidden:false
                    }
                },
            ]
        },
        {
            path: 'yunyinmanage',
            name: 'yunyinmanage',
            component: Main,
            meta: {
                title: '运营管理',
                icon: 'icon-yunying'
            },
            children: [
                {
                    path: 'order',
                    name: 'order',
                    component: () => import('@/views/yunyinmanage/Order.vue'),
                    meta: {
                        title: '订单管理'
                    }
                },
                {
                    path: 'comment',
                    name: 'comment',
                    component: () => import('@/views/yunyinmanage/Comment.vue'),
                    meta: {
                        title: '评论管理'
                    }
                },
                {
                    path: 'yunFei',
                    name: 'yunFei',
                    component: () => import('@/views/yunyinmanage/YunFei.vue'),
                    meta: {
                        title: '运费管理'
                    }
                },
            ]
        },
        {
            path: 'productmanage',
            name: 'productmanage',
            component: Main,
            meta: {
                title: '商品管理',
                icon: 'icon-31quanbushangpin'
            },
            children: [
                {
                    path: 'productlist',
                    name: 'productlist',
                    component: () => import('@/views/productmanage/ProductList.vue'),
                    meta: {
                        title: '商品列表'
                    }
                },
                {
                    path: 'tuangou',
                    name: 'tuangou',
                    component: () => import('@/views/productmanage/TuanGou.vue'),
                    meta: {
                        title: '团购商品'
                    }
                },
                {
                    path: 'categroymanage',
                    name: 'categroymanage',
                    component: () => import('@/views/productmanage/CategoryManage.vue'),
                    meta: {
                        title: '类目管理'
                    }
                },
                {
                    path: 'createproduct',
                    name: 'createproduct',
                    component: () => import('@/views/productmanage/CreateProduct.vue'),
                    meta: {
                        title: '创建商品',
                        hidden: true,
                        keepAlive: true
                    }
                },
                {
                    path: 'editproduct/:id',
                    name: 'editproduct',
                    component: () => import('@/views/productmanage/EditProduct.vue'),
                    meta: {
                        title: '编辑商品',
                        hidden: true,
                        keepAlive: true
                    },
                    props: true
                },
            ]
        },
        {
            path: 'tuiguanmanage',
            name: 'tuiguanmanage',
            component: Main,
            meta: {
                title: '推广管理',
                icon: 'icon-tuiguangguanli'
            },
            children: [
                {
                    path: 'guangao',
                    name: 'guangao',
                    component: () => import('@/views/tuiguanmanage/GuanGao.vue'),
                    meta: {
                        title: '广告管理'
                    }
                },
                {
                    path: 'youhuiquan',
                    name: 'youhuiquan',
                    component: () => import('@/views/tuiguanmanage/YouHuiQuan.vue'),
                    meta: {
                        title: '优惠券管理'
                    }
                }
            ]
        },
        {
            path: 'usermanage',
            name: 'usermanage',
            component: Main,
            meta: {
                title: '用户管理',
                icon: 'icon-user'
            },
            children: [
                {
                    path: 'addr',
                    name: 'addr',
                    component: () => import('@/views/usermanage/AddrManage.vue'),
                    meta: {
                        title: '地址管理'
                    }
                },
                {
                    path: 'huiyuan',
                    name: 'huiyuan',
                    component: () => import('@/views/usermanage/HuiYuan.vue'),
                    meta: {
                        title: '会员管理'
                    }
                }
            ]
        },
        {
            path: 'systemmanage',
            name: 'systemmanage',
            component: Main,
            meta: {
                title: '系统管理',
                icon: 'icon-setting'
            },
            children: [
                {
                    path: 'setting',
                    name: 'setting',
                    component: () => import('@/views/systemmanage/Setting.vue'),
                    meta: {
                        title: '系统配置'
                    }
                },
                {
                    path: 'adminuser',
                    name: 'adminuser',
                    component: () => import('@/views/systemmanage/AdminUser.vue'),
                    meta: {
                        title: '管理员'
                    }
                },
                {
                    path: 'operatelog',
                    name: 'operatelog',
                    component: () => import('@/views/systemmanage/OperateLog.vue'),
                    meta: {
                        title: '日志操作'
                    }
                },
                {
                    path: 'rolemanage',
                    name: 'rolemanage',
                    component: () => import('@/views/systemmanage/RoleManage.vue'),
                    meta: {
                        title: '角色管理'
                    }
                },
            ]
        },
    ]

    return arr
}
export { getLeftMenu }